-
Notifications
You must be signed in to change notification settings - Fork 9
#2487: CI: switch one build to use the C++20 standard #2488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2487: CI: switch one build to use the C++20 standard #2488
Conversation
|
diff --git a/src/vt/collective/reduce/reduce.impl.h b/src/vt/collective/reduce/reduce.impl.h
index 61b0475e4..8b108418d 100644
--- a/src/vt/collective/reduce/reduce.impl.h
+++ b/src/vt/collective/reduce/reduce.impl.h
@@ -151,9 +151,12 @@ Reduce::PendingSendType Reduce::reduce(
ReduceNumType num_contrib
) {
auto msg_ptr = promoteMsg(msg);
- return PendingSendType{theMsg()->getEpochContextMsg(msg_ptr), [this, root, msg_ptr, id, num_contrib](){
- reduceImmediate<f>(root, msg_ptr.get(), id, num_contrib);
- } };
+ return PendingSendType{
+ theMsg()->getEpochContextMsg(msg_ptr),
+ [this, root, msg_ptr, id, num_contrib]() {
+ reduceImmediate<f>(root, msg_ptr.get(), id, num_contrib);
+ }
+ };
}
template <typename MsgT, ActiveTypedFnType<MsgT>* f>
diff --git a/src/vt/messaging/active.cc b/src/vt/messaging/active.cc
index 1daeed613..ecd0f9064 100644
--- a/src/vt/messaging/active.cc
+++ b/src/vt/messaging/active.cc
@@ -1105,13 +1105,13 @@ void ActiveMessenger::finishPendingActiveMsgAsyncRecv(InProgressIRecv* irecv) {
envelopeSetPutPtrOnly(msg->env, put_ptr);
put_finished = true;
} else {
- /*bool const put_delivered = */recvDataMsg(
+ /*bool const put_delivered = */ recvDataMsg(
1, put_tag, sender,
- [this, base, sender](PtrLenPairType ptr, ActionType deleter){
+ [this, base, sender](PtrLenPairType ptr, ActionType deleter) {
envelopeSetPutPtr(base->env, std::get<0>(ptr), std::get<1>(ptr));
processActiveMsg(base, sender, true, deleter);
}
- );
+ );
}
}
diff --git a/src/vt/messaging/collection_chain_set.impl.h b/src/vt/messaging/collection_chain_set.impl.h
index 8e44f9896..c99137223 100644
--- a/src/vt/messaging/collection_chain_set.impl.h
+++ b/src/vt/messaging/collection_chain_set.impl.h
@@ -69,7 +69,9 @@ CollectionChainSet<Index>::CollectionChainSet(
auto const this_node = theContext()->getNode();
auto const proxy_bits = proxy.getProxy();
- ListenerType l = [this, p, layout, this_node](ElementEventEnum event, IndexT idx, NodeType home) {
+ ListenerType l = [this, p, layout, this_node](
+ ElementEventEnum event, IndexT idx, NodeType home
+ ) {
switch (event) {
case ElementEventEnum::ElementCreated:
case ElementEventEnum::ElementMigratedIn:
diff --git a/src/vt/rdma/rdma.cc b/src/vt/rdma/rdma.cc
index 2a0a71039..b153bbcf6 100644
--- a/src/vt/rdma/rdma.cc
+++ b/src/vt/rdma/rdma.cc
@@ -1289,7 +1289,9 @@ void RDMAManager::createDirectChannelInternal(
);
auto cb = theCB()->makeFunc<GetInfoChannel>(
- pipe::LifetimeEnum::Once, [this, type, han, non_target, action, unique_channel_tag, is_target, override_target](GetInfoChannel* msg){
+ pipe::LifetimeEnum::Once,
+ [this, type, han, non_target, action, unique_channel_tag, is_target,
+ override_target](GetInfoChannel* msg) {
auto const& my_num_bytes = msg->num_bytes;
createDirectChannelFinish(
type, han, non_target, action, unique_channel_tag, is_target, my_num_bytes,
@@ -1326,18 +1328,21 @@ void RDMAManager::removeDirectChannel(
auto const target = getTarget(han, override_target);
if (this_node != target) {
- auto cb = theCB()->makeFunc(pipe::LifetimeEnum::Once, [this, han, action, target, this_node]{
- auto iter = channels_.find(
- makeChannelLookup(han,RDMA_TypeType::Put,target,this_node)
- );
- if (iter != channels_.end()) {
- iter->second.freeChannel();
- channels_.erase(iter);
- }
- if (action) {
- action();
+ auto cb = theCB()->makeFunc(
+ pipe::LifetimeEnum::Once,
+ [this, han, action, target, this_node] {
+ auto iter = channels_.find(
+ makeChannelLookup(han, RDMA_TypeType::Put, target, this_node)
+ );
+ if (iter != channels_.end()) {
+ iter->second.freeChannel();
+ channels_.erase(iter);
+ }
+ if (action) {
+ action();
+ }
}
- });
+ );
auto msg = makeMessage<DestroyChannel>(
RDMA_TypeType::Get, han, no_byte, no_tag, cb
diff --git a/src/vt/rdmahandle/holder.impl.h b/src/vt/rdmahandle/holder.impl.h
index 28af16e35..e342528eb 100644
--- a/src/vt/rdmahandle/holder.impl.h
+++ b/src/vt/rdmahandle/holder.impl.h
@@ -150,7 +150,7 @@ RequestHolder Holder<T,E>::rget(
auto mpi_type_str = TypeMPI<T>::getTypeStr();
RequestHolder r;
if (mpi2_) {
- r.add([this, l, node, ptr, offset, len, mpi_type, mpi_type_str]{
+ r.add([this, l, node, ptr, offset, len, mpi_type, mpi_type_str] {
LockMPI _scope_lock(l, node, data_window_);
vt_debug_print(
verbose, rdma,
@@ -188,7 +188,7 @@ RequestHolder Holder<T,E>::rput(
auto mpi_type_str = TypeMPI<T>::getTypeStr();
RequestHolder r;
if (mpi2_) {
- r.add([this, l, node, ptr, offset, len, mpi_type, mpi_type_str]{
+ r.add([this, l, node, ptr, offset, len, mpi_type, mpi_type_str] {
LockMPI _scope_lock(l, node, data_window_);
vt_debug_print(
verbose, rdma,
@@ -245,7 +245,7 @@ RequestHolder Holder<T,E>::raccum(
auto mpi_type_str = TypeMPI<T>::getTypeStr();
RequestHolder r;
if (mpi2_) {
- r.add([this, l, node, offset, ptr, len, mpi_type, mpi_type_str, op]{
+ r.add([this, l, node, offset, ptr, len, mpi_type, mpi_type_str, op] {
LockMPI _scope_lock(l, node, data_window_);
vt_debug_print(
verbose, rdma,
diff --git a/src/vt/topos/location/location.impl.h b/src/vt/topos/location/location.impl.h
index 35b70c0f6..3ec768248 100644
--- a/src/vt/topos/location/location.impl.h
+++ b/src/vt/topos/location/location.impl.h
@@ -597,7 +597,8 @@ void EntityLocationCoord<EntityID>::routeMsgNode(
theTerm()->produce(epoch);
- auto trigger_msg_handler_action = [this, msg, home_node](EntityID const& hid) {
+ auto trigger_msg_handler_action = [this, msg,
+ home_node](EntityID const& hid) {
bool const& has_handler = msg->hasHandler();
auto const& from = msg->getLocFromNode();
if (has_handler) {
@@ -662,30 +663,34 @@ void EntityLocationCoord<EntityID>::routeMsgNode(
EntityID id_ = id;
// buffer the message here, the entity will be registered in the future
- insertPendingEntityAction(id_, [this, id_, epoch, msg, home_node, trigger_msg_handler_action](NodeType resolved) {
- auto const& my_node = theContext()->getNode();
-
- vt_debug_print(
- normal, location,
- "EntityLocationCoord: routeMsgNode: trigger action: resolved={}, "
- "this_node={}, id={}, ref={}, epoch={:x}\n",
- resolved, my_node, id_, envelopeGetRef(msg->env), epoch
- );
-
- theMsg()->pushEpoch(epoch);
- if (resolved == my_node) {
- trigger_msg_handler_action(id_);
- } else {
- /*
+ insertPendingEntityAction(
+ id_,
+ [this, id_, epoch, msg, home_node,
+ trigger_msg_handler_action](NodeType resolved) {
+ auto const& my_node = theContext()->getNode();
+
+ vt_debug_print(
+ normal, location,
+ "EntityLocationCoord: routeMsgNode: trigger action: resolved={}, "
+ "this_node={}, id={}, ref={}, epoch={:x}\n",
+ resolved, my_node, id_, envelopeGetRef(msg->env), epoch
+ );
+
+ theMsg()->pushEpoch(epoch);
+ if (resolved == my_node) {
+ trigger_msg_handler_action(id_);
+ } else {
+ /*
* Recurse with the new updated node information. This occurs
* typically when an non-migrated registration occurs off the home
* node and messages are buffered, awaiting forwarding information.
*/
- routeMsgNode<MessageT>(id_, home_node, resolved,msg);
+ routeMsgNode<MessageT>(id_, home_node, resolved, msg);
+ }
+ theMsg()->popEpoch(epoch);
+ theTerm()->consume(epoch);
}
- theMsg()->popEpoch(epoch);
- theTerm()->consume(epoch);
- });
+ );
}
}
}
@@ -779,14 +784,15 @@ void EntityLocationCoord<EntityID>::routePreparedMsg(
} else {
theTerm()->produce(epoch);
// non-eager protocol: get location first then send message after resolution
- getLocation(msg->getEntity(), msg->getHomeNode(), [this, epoch, msg](NodeType node){
- theMsg()->pushEpoch(epoch);
- routeMsgNode<MessageT>(
- msg->getEntity(), msg->getHomeNode(), node, msg
- );
- theMsg()->popEpoch(epoch);
- theTerm()->consume(epoch);
- });
+ getLocation(
+ msg->getEntity(), msg->getHomeNode(),
+ [this, epoch, msg](NodeType node) {
+ theMsg()->pushEpoch(epoch);
+ routeMsgNode<MessageT>(msg->getEntity(), msg->getHomeNode(), node, msg);
+ theMsg()->popEpoch(epoch);
+ theTerm()->consume(epoch);
+ }
+ );
}
}
diff --git a/src/vt/vrt/collection/balance/lb_common.h b/src/vt/vrt/collection/balance/lb_common.h
index 2714e3a8f..017ded3ea 100644
--- a/src/vt/vrt/collection/balance/lb_common.h
+++ b/src/vt/vrt/collection/balance/lb_common.h
@@ -78,8 +78,8 @@ struct PhaseOffset {
PhaseOffset() = delete;
PhaseOffset(int in_phases, unsigned int in_subphase)
- : phases(in_phases), subphase(in_subphase)
- {}
+ : phases(in_phases),
+ subphase(in_subphase) { }
int phases;
static constexpr unsigned int NEXT_PHASE = 0;
diff --git a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
index 9d91894a3..57ad1e713 100644
--- a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
+++ b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
@@ -186,11 +186,14 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {
auto phase = msg->phase;
auto proposed = std::make_shared<ProposedReassignment>(model_, reassignment);
- runInEpochCollective("LBManager::runLB -> computeStats", [this, proposed, phase] {
- auto stats_cb = vt::theCB()->makeBcast<&LBManager::statsHandler>(proxy_);
- before_lb_stats_ = false;
- computeStatistics(proposed, false, phase, stats_cb);
- });
+ runInEpochCollective(
+ "LBManager::runLB -> computeStats",
+ [this, proposed, phase] {
+ auto stats_cb = vt::theCB()->makeBcast<&LBManager::statsHandler>(proxy_);
+ before_lb_stats_ = false;
+ computeStatistics(proposed, false, phase, stats_cb);
+ }
+ );
// Inform the collection manager to rebuild spanning trees if needed
if (reassignment->global_migration_count != 0) {
diff --git a/src/vt/vrt/collection/manager.impl.h b/src/vt/vrt/collection/manager.impl.h
index d1a7dcb2b..32eaa47f5 100644
--- a/src/vt/vrt/collection/manager.impl.h
+++ b/src/vt/vrt/collection/manager.impl.h
@@ -127,7 +127,7 @@ CollectionManager::runConstructor(Args&&... args) {
template <typename ColT>
void CollectionManager::addCleanupFn(VirtualProxyType proxy) {
- cleanup_fns_[proxy].push_back([this, proxy]{
+ cleanup_fns_[proxy].push_back([this, proxy] {
CollectionProxyWrapType<ColT> typed_proxy(proxy);
destroyMatching(typed_proxy);
});
@@ -1792,7 +1792,7 @@ MigrateStatus CollectionManager::migrate(
auto const epoch = theMsg()->getEpoch();
theTerm()->produce(epoch);
- schedule([this, epoch, col_proxy, idx, dest]{
+ schedule([this, epoch, col_proxy, idx, dest] {
theMsg()->pushEpoch(epoch);
migrateOut<ColT,IndexT>(col_proxy, idx, dest);
theMsg()->popEpoch(epoch);
@@ -2342,20 +2342,22 @@ messaging::PendingSend CollectionManager::schedule(
) {
theTerm()->produce(cur_epoch);
return messaging::PendingSend(
- msg, [this, cur_epoch, action, execute_now]([[maybe_unused]] MsgVirtualPtr<BaseMsgType> inner_msg
- ){
- auto fn = [=]{
- theMsg()->pushEpoch(cur_epoch);
- action();
- theMsg()->popEpoch(cur_epoch);
- theTerm()->consume(cur_epoch);
- };
- if (execute_now) {
- fn();
- } else {
- schedule(fn);
+ msg,
+ [this, cur_epoch, action,
+ execute_now]([[maybe_unused]] MsgVirtualPtr<BaseMsgType> inner_msg) {
+ auto fn = [=] {
+ theMsg()->pushEpoch(cur_epoch);
+ action();
+ theMsg()->popEpoch(cur_epoch);
+ theTerm()->consume(cur_epoch);
+ };
+ if (execute_now) {
+ fn();
+ } else {
+ schedule(fn);
+ }
}
- });
+ );
}
}}} /* end namespace vt::vrt::collection */
diff --git a/tests/unit/objgroup/test_objgroup_common.h b/tests/unit/objgroup/test_objgroup_common.h
index 1ecc8f464..cacdaba99 100644
--- a/tests/unit/objgroup/test_objgroup_common.h
+++ b/tests/unit/objgroup/test_objgroup_common.h
@@ -138,7 +138,7 @@ struct MyObjB {
struct VectorPayload {
VectorPayload() = default;
- explicit VectorPayload(std::vector<int> in_vec) : vec_(std::move(in_vec)) {}
+ explicit VectorPayload(std::vector<int> in_vec) : vec_(std::move(in_vec)) { }
friend VectorPayload operator+(VectorPayload v1, VectorPayload const& v2) {
for (auto&& elm : v2.vec_) {
diff --git a/tests/unit/termination/test_term_dep_send_chain.cc b/tests/unit/termination/test_term_dep_send_chain.cc
index 728e23517..d515f17e2 100644
--- a/tests/unit/termination/test_term_dep_send_chain.cc
+++ b/tests/unit/termination/test_term_dep_send_chain.cc
@@ -615,21 +615,26 @@ struct MergeObjGroup
void interact( MergeObjGroup &other ) {
auto other_proxy = other.backend_proxy_;
- vt::messaging::CollectionChainSet<vt::Index2D>::mergeStepCollective( "interact",
- *chains_,
- *other.chains_,
- [this, other_proxy]( vt::Index2D idx) {
- return backend_proxy_(idx).template send<MergeCol::GhostMsg, &MergeCol::ghost>(other_proxy);
- });
+ vt::messaging::CollectionChainSet<vt::Index2D>::mergeStepCollective(
+ "interact", *chains_, *other.chains_,
+ [this, other_proxy](vt::Index2D idx) {
+ return backend_proxy_(idx)
+ .template send<MergeCol::GhostMsg, &MergeCol::ghost>(other_proxy);
+ }
+ );
}
void check( double offset, double other_offset, bool is_left ) {
- chains_->nextStep("initData", [this, offset, is_left, other_offset](vt::Index2D idx) {
- auto x = calcVal(1,idx) + offset;
- if ( !is_left )
- x *= calcVal(1,idx) + other_offset;
- return backend_proxy_(idx).template send<MergeCol::DataMsg, &MergeCol::check>(x);
- });
+ chains_->nextStep(
+ "initData",
+ [this, offset, is_left, other_offset](vt::Index2D idx) {
+ auto x = calcVal(1, idx) + offset;
+ if (!is_left)
+ x *= calcVal(1, idx) + other_offset;
+ return backend_proxy_(idx)
+ .template send<MergeCol::DataMsg, &MergeCol::check>(x);
+ }
+ );
}
void finishUpdate() {
diff --git a/tests/unit/termination/test_termination_action_callable.extended.cc b/tests/unit/termination/test_termination_action_callable.extended.cc
index 87bf51d2b..67b745963 100644
--- a/tests/unit/termination/test_termination_action_callable.extended.cc
+++ b/tests/unit/termination/test_termination_action_callable.extended.cc
@@ -86,7 +86,7 @@ TEST_F(TestTermCallable, test_add_action_unique) /*NOLINT*/{
// assign an arbitrary action to be triggered at
// the end of the epoch and toggle the previous flag.
- ::vt::theTerm()->addActionEpoch(epoch, [this, epoch]{
+ ::vt::theTerm()->addActionEpoch(epoch, [this, epoch] {
vt_debug_print(
normal, term,
"current epoch:{:x} finished\n",
@@ -97,7 +97,7 @@ TEST_F(TestTermCallable, test_add_action_unique) /*NOLINT*/{
// assign a callable to be triggered after
// the action submitted for the given epoch.
- ::vt::theTerm()->addActionUnique(epoch, [this, epoch]{
+ ::vt::theTerm()->addActionUnique(epoch, [this, epoch] {
vt_debug_print(
normal, term,
"trigger callable for epoch:{:x}\n",
|
Pipelines resultsvt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-clang-9-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-24-04-clang-18-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-10-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-24-04-clang-17-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-9-ldms-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-gcc-12-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-clang-12-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-alpine-3-16-clang-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-clang-13-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-24-04-clang-16-vtk-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-gcc-12-vtk-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-24-04-gcc-14-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-24-04-clang-16-zoltan-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-clang-11-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-24-04-gcc-13-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-icpx-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-9-cuda-11-4-3-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-9-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-gcc-11-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-clang-10-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-22-04-clang-15-cpp-cxx20 Build for 9051664 (2025-10-07 19:37:04 UTC) vt-build-amd64-ubuntu-20-04-gcc-9-cpp-docs Build for 7a055b2 (2025-10-07 19:31:35 UTC) vt-build-amd64-ubuntu-22-04-clang-14-cpp Build for 9051664 (2025-10-07 19:37:04 UTC) |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #2488 +/- ##
===========================================
+ Coverage 88.55% 88.57% +0.02%
===========================================
Files 728 728
Lines 31523 31520 -3
===========================================
+ Hits 27914 27918 +4
+ Misses 3609 3602 -7
🚀 New features to boost your workflow:
|
nlslatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Fixes #2487